import * as CustomErrorType from './types';

/**
 * 自定义error对象
 * @class CustomError
 * @memberOf fe-lib
 */
class CustomError {
  constructor(message, type = CustomErrorType.APP, data = {}) {
    this.name = 'CustomError';
    this.message = message;
    this.type = type;
    this.data = data;
  }
}

export {
  CustomError,
  CustomErrorType
};
